package com.pi.pro.xcmg.am.was.edi.wcs.common;


import com.pi.common.CodesConstants;
import com.pi.pro.xcmg.am.common.XcmgAmConstants;

import java.util.HashMap;
import java.util.Map;

public class WcsWasXcmgExchangeConstants {


    //
    public static final String WCS_ENDPOINT_NAMESPACE                          = "wcs:http://";

    public final static boolean FLAG_YES                                       = true;
    public final static boolean FLAG_NO                                        = false;

    public final static Long WAS_USER_ID                                       = 1L;
    public final static String WAS_USER_NAME                                   = "WAS_USER";


    /******************************************************************************************************/
    /** LOC
     /******************************************************************************************************/


    /******************************************************************************************************/
    /** TASK_TYPE
     /******************************************************************************************************/
    //入库任务
    public final static String TASK_TYPE_INBOUND                               = "1";
    //出库任务
    public final static String TASK_TYPE_OUTBOUND                              = "2";
    //搬运任务
    public final static String TASK_TYPE_MOVE                                  = "3";

    //入库任务
    public final static String TASK_TYPE_TEXT_INBOUND                          = "入库";
    //出库任务
    public final static String TASK_TYPE_TEXT_OUTBOUND                         = "下架";
    //搬运任务
    public final static String TASK_TYPE_TEXT_MOVE                             = "移库";
    //搬运任务
    public final static String TASK_TYPE_TEXT_CROSS                            = "越库";






    /******************************************************************************************************/
    /** MOVE_REQ_TYPE
     /******************************************************************************************************/
    //空托入库
    public final static String MOVE_REQ_TYPE_EPAL                              = "2";
    //扫码入库
    public final static String MOVE_REQ_TYPE_RECEIVE                           = "1";
    //拣选回库
    public final static String MOVE_REQ_TYPE_RETURN                            = "0";


    /******************************************************************************************************/
    /** TASK_PRIORITY
    /******************************************************************************************************/
    //常规-无插队
    public final static String TASK_PRIORITY_NORMAL                            = "0";
    //高-插队
    public final static String TASK_PRIORITY_HIGH                              = "1";



    /******************************************************************************************************/
    /** 是否载货
     /******************************************************************************************************/
    //有
    public final static String WORK_WITH_LOAD                                  = "1";
    //无
    public final static String WORK_WITH_FREE                                  = "0";



    /******************************************************************************************************/
    /** 业务类型
     /******************************************************************************************************/
    //入库拍按钮传1
    public final static String CHECK_TYPE_MOVE_REQ                             = "1";
    //称重和外形检测传
    public final static String CHECK_TYPE_TU_STANCE                            = "3";




    /******************************************************************************************************/
    /** RESULT_CODE
     /******************************************************************************************************/
    //成功
    public final static String RESULT_CODE_OK                                  = "100";
    //失败
    public final static String RESULT_CODE_ERROR                               = "200";
    //漏拣回位
    public final static String RESULT_CODE_RETURN                              = "500";


    /******************************************************************************************************/
    /** TASK_CHANGE_STATUS
     /******************************************************************************************************/
    //任务开始
    public final static String TASK_CHANGE_STATUS_WORK                         = "1";
    //任务完成
    public final static String TASK_CHANGE_STATUS_FIN                          = "2";
    //任务取消
    public final static String TASK_CHANGE_STATUS_CANCEL                       = "3";


    /******************************************************************************************************/
    /** STATION_CHANGE_STATUS
     /******************************************************************************************************/
    //空闲     2
    public final static String STATION_CHANGE_STATUS_FREE                      = "1";
    //有货
    public final static String STATION_CHANGE_STATUS_OCCUPY                    = "2";
    //停用
    public final static String STATION_CHANGE_STATUS_DISABLED                 = "4";


    /******************************************************************************************************/
    /** CONTAINER_TYPE
     /******************************************************************************************************/
    //铁料箱
    public final static String CONTAINER_TYPE_TOTE                           = "1";
    //铁托盘
    public final static String CONTAINER_TYPE_PALLET                         = "2";


    /******************************************************************************************************/
    /**
     * CACHE
     * /
     ******************************************************************************************************/
    public static Map<String, String> moveReqTypes                               = new HashMap<>();
    public static Map<String, String> moveCheckTypes                             = new HashMap<>();
    public static Map<String, String> taskChangeStatus                           = new HashMap<>();
    public static Map<String, String> stationLiveStatus                          = new HashMap<>();
    public static Map<String, String> containerType                              = new HashMap<>();

    public static Map<String, String> zonePickStations                           = new HashMap<>();




    //

    static {
        moveReqTypes.put(MOVE_REQ_TYPE_EPAL, "空托入库");
        moveReqTypes.put(MOVE_REQ_TYPE_RECEIVE, "扫码入库");
        moveReqTypes.put(MOVE_REQ_TYPE_RETURN, "拣选回库");

        moveCheckTypes.put(CHECK_TYPE_MOVE_REQ, "入库");
        moveCheckTypes.put(CHECK_TYPE_TU_STANCE, "检测");

        taskChangeStatus.put(TASK_CHANGE_STATUS_WORK, "任务开始");
        taskChangeStatus.put(TASK_CHANGE_STATUS_FIN, "任务完成");
        taskChangeStatus.put(TASK_CHANGE_STATUS_CANCEL, "任务取消");

        stationLiveStatus.put(STATION_CHANGE_STATUS_FREE, "空闲");
        stationLiveStatus.put(STATION_CHANGE_STATUS_OCCUPY, "有货");
        stationLiveStatus.put(STATION_CHANGE_STATUS_DISABLED, "停用");

        containerType.put(CONTAINER_TYPE_TOTE, "铁料箱");
        containerType.put(CONTAINER_TYPE_PALLET, "铁托盘");

        zonePickStations.put(XcmgAmConstants.ZONE_CODE_PA01, "1023;1028;1033;1038");
        zonePickStations.put(XcmgAmConstants.ZONE_CODE_PA02, "2023;2028;2033;2038");
    }

}
